<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="./css/login.css" />
<title>用户登录</title>
</head>
<body>
	<div id="wrapper">
		<div id="formtitle">登录账户</div>
		<div id="loginform">
			<form method="post" action="./loginaction.do">
				<div class="form-label">
					<label for="username"> 用户名:</label>
				</div>
				<div class="form-input">
					<%
						String getb = (String) request.getParameter("getb");
						request.setAttribute("getb", getb);
						String id=(String)request.getParameter("id");
						request.setAttribute("id",id);
						Cookie[] cookies = request.getCookies();
						String username = "";
						if (cookies != null) {
							for (Cookie c : cookies) {
								if (c.getName().equals("username")) {
									username = c.getValue();
									break;
								}
							}
						}
					%>
					<input type="text" name="username" id="username" size="21"
						value="<%=username%>" />
				</div>
				<div class="form-label">
					<label for="password"> 密 码:</label>
				</div>
				<div class="form-input">
					<input type="password" name="password" id="password" size="21"
						value="" />
				</div>
				<div class="form-label">
					<label for="yzm"> 验证码:</label>
				</div>
				<div class="form-input">
					<input type="text" name="yzm" id="yzm" size="9" value="" /> <img
						src="image.do" />
				</div>
				<div class="button">
					<input type="hidden" name="getb" value="${getb}"> 
					<input type="hidden" name="id" value="${id}">
					<input type="hidden" name="page" value="1">
					<input
						type="submit" id="loginbtn" value="登录" />
				</div>

				<a href="addnewuser.jsp">注册</a>
				<div class="remember-button">
					<input type="checkbox" name="rememberusername"
						id="rememberusername" value="1" checked="checked" />
				</div>
				<div class="remember">
					<label for="rememberusername">记住用户名</label>
				</div>
			</form>
		</div>
	</div>
</body>
</html>